﻿using AbpDemo.Admins;
using AbpDemo.Admins.Dto;
using AbpDemo.Authors;
using AbpDemo.Authors.Dto;
using AbpDemo.Menus;
using AbpDemo.Menus.Dto;
using AbpDemo.Roles;
using AbpDemo.Roles.Dto;
using AutoMapper;

namespace AbpDemo;

public class AbpDemoApplicationAutoMapperProfile : Profile
{
    public AbpDemoApplicationAutoMapperProfile()
    {
        /* You can configure your AutoMapper mapping configuration here.
         * Alternatively, you can split your mapping configurations
         * into multiple profile classes for a better organization. */
        CreateMap<LoginDto, Admin>();
        CreateMap<RegisterDto, Admin>();
        CreateMap<RoleDto, Role>().ReverseMap();
        CreateMap<RoleCreateDto, Role>().ReverseMap();
        CreateMap<MenuDto, Menu>().ReverseMap();
        CreateMap<CreateUpdateMenuDto, Menu>().ReverseMap();
        CreateMap<AuthorDto, Author>().ReverseMap();
        CreateMap<CreateUpdateAuthorDto, Author>().ReverseMap();
    }
}
